package com.java.tutorials.jdk7.paths;

import java.nio.file.Path;
import java.nio.file.Paths;

/**
 * Created by xuzhike on 2016/1/27.
 * http://www.java2s.com/Code/Java/JDK-7/GetthenumberofnameelementinaPathobject.htm
 * Get the number of name element in a Path object
 */
public class GetthenumberofnameelementinaPathobject {
    public static void main(String[] args) throws Exception{

        Path listing = Paths.get("E:\\OpenSources\\MyProjects");

        System.out.println("Number of Name Elements in the Path [" + listing.getNameCount() + "]");
    }
}
